//Generate four random hex digits.
function S4(){
    return (((1+Math.random())*0x10000)|0).toString(16).substr(1);
};

//Generate a pseudo-GUID by concatenating random hexadecimal.
var guid = function (){
    return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); 
};

module.exports = guid;
